package com.java8.stream;

import org.junit.Test;

import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask;

/**
 * @author xuehu
 * @date 2020/12/1 14:24
 */

public class TestForkJoin {

    @Test
    public void test1() {
        ForkJoinPool pool = new ForkJoinPool();

        ForkJoinTask<Long> task = new ForkJoinCalculate(0, 100000000L);
        Long invoke = pool.invoke(task);
        System.out.println(invoke);
    }
}
